package com.im.controller;

import com.im.service.dto.BidInfo;
import com.im.service.dto.DocManage;
import com.im.service.dto.EvalBidParty;
import com.im.service.dto.ImplementProject;
import com.im.service.dto.PurchasePlan;
import com.im.service.dto.Result;
import com.im.service.dto.TenderInfo;
import com.im.util.ReturnsUtil;
import com.im.viewmodel.projectInvitManage.InvitInfoManageReqVo;
import com.im.viewmodel.projectInvitManage.InvitInfoManageRspVo;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import net.sf.json.JSONObject;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/inviteInfoManageService")
public class  InviteInfoManageService extends BaseController{

  @RequestMapping(value = "/queryInviteInfo", method = RequestMethod.POST)
  @ResponseBody
  public Object queryInviteInfo(InvitInfoManageReqVo invitInfoManageReqVo) {
    HashMap<String, Object> param = new HashMap<String, Object>();
    List<InvitInfoManageRspVo> list = new ArrayList<InvitInfoManageRspVo>();
    InvitInfoManageRspVo info = new InvitInfoManageRspVo();
    TenderInfo tenderInfo = new TenderInfo();
    tenderInfo.setTenderInfoId("123123");
    tenderInfo.setImpleProjId("2222");
    tenderInfo.setPurchPlanId("11111");
    tenderInfo.setDocManageId("2222");
    BidInfo bidInfo = new BidInfo();
    bidInfo.setBidInfoId("456456");
    Result result = new Result();
    result.setResultId("111");
    result.setBidInfoId(bidInfo.getBidInfoId());
    result.setTenderInfoId(tenderInfo.getTenderInfoId());
    result.setOrgId("111");
    DocManage docManage = new DocManage();
    docManage.setDocManageId(tenderInfo.getDocManageId());
    docManage.setDocName("测试标书");
    ImplementProject implementProject = new ImplementProject();
    implementProject.setImpleProjName("测试项目");
    implementProject.setImpleProjId(tenderInfo.getImpleProjId());
    PurchasePlan purchasePlan = new PurchasePlan();
    purchasePlan.setPurchPlanName("测试采购计划");
    purchasePlan.setPurchPlanId(tenderInfo.getPurchPlanId());
    EvalBidParty evalBidParty=new EvalBidParty();
    evalBidParty.setBidPartyId("111");
    evalBidParty.setResultId(result.getResultId());
    evalBidParty.setReviewer("111,222,333");
    info.setBidInfo(bidInfo);
    info.setDocManage(docManage);
//    info.setEvalBidParty(evalBidParty);
//    info.setImplementProject(implementProject);
//    info.setPurchasePlan(purchasePlan);
//    info.setResult(result);
    info.setTenderInfo(tenderInfo);
    list.add(info);
    param.put("total", 1);
    param.put("rows", list);
    return buildAjaxResultMap(param,"success",0);
  }
}
